﻿// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace SnapObjects.Data.Sqlite
{
    internal class SqliteAdoDbSchemaProvider : AdoDbSchemaProvider
    {
        public SqliteAdoDbSchemaProvider(DataContext dataContext) : base(dataContext)
        {
        }

        public override IReadOnlyList<ProcedureSchema> GetProcedureParameterSchema(string procedure)
        {
            throw new NotSupportedException();
        }

        public override Task<IReadOnlyList<ProcedureSchema>> GetProcedureParameterSchemaAsync(
            string procedure, 
            CancellationToken cancellationToken)
        {
            throw new NotSupportedException();
        }

        public override IReadOnlyList<IReadOnlyList<DbColumnInfo>> GetProcedureColumnSchema(
            string procedure, 
            IEnumerable<IAdoDbParameter> parameters)
        {
            throw new NotSupportedException();
        }

        public override Task<IReadOnlyList<IReadOnlyList<DbColumnInfo>>> GetProcedureColumnSchemaAsync(
            string procedure, 
            IEnumerable<IAdoDbParameter> parameters, 
            CancellationToken cancellationToken)
        {
            throw new NotSupportedException();
        }

        public override IReadOnlyList<ProcedureSchema> GetFunctionParameterSchema(string function)
        {
            throw new NotSupportedException();
        }

        public override Task<IReadOnlyList<ProcedureSchema>> GetFunctionParameterSchemaAsync(
            string function, 
            CancellationToken cancellationToken)
        {
            throw new NotSupportedException();
        }

        public override IReadOnlyList<IReadOnlyList<DbColumnInfo>> GetFunctionColumnSchema(
            string function, 
            FunctionReturnType functionReturnType, 
            IEnumerable<IAdoDbParameter> parameters)
        {
            throw new NotSupportedException();
        }

        public override Task<IReadOnlyList<IReadOnlyList<DbColumnInfo>>> GetFunctionColumnSchemaAsync(
            string function, 
            FunctionReturnType functionReturnType, 
            IEnumerable<IAdoDbParameter> parameters, 
            CancellationToken cancellationToken)
        {
            throw new NotSupportedException();
        }

        protected override SqlColumnSchemaProvider CreateSqlColumnSchemaProvider()
        {
            return new SqliteSqlColumnSchemaProvider(_dataContext);
        }

        protected override ProcedureColumnSchemaProvider CreateProcedureColumnSchemaProvider()
        {
            return null;
        }

        protected override RoutineParameterSchemaProvider CreateProcedureParameterSchemaProvider()
        {
            return null;
        }

        protected override FunctionColumnSchemaProvider CreateFunctionColumnSchemaProvider()
        {
            return null;
        }

        protected override RoutineParameterSchemaProvider CreateFunctionParameterSchemaProvider()
        {
            return null;
        }
    }
}
